<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">
	<f:view>
		<p:commandButton value="Novo Cadastro" action="#{formaPagamentoManager.prepareSave}" update=":form"/>
		
		<p:dataTable value="#{formaPagamentoManager.list}" var="m" rows="5" paginator="true"
			emptyMessage="Não existem resultados."
		>
			<p:column headerText="Descrição">
				<h:outputText value="#{m.descricao}" />
			</p:column>
			<p:column headerText="Quitação">
				<h:selectBooleanCheckbox value="#{m.darQuitacaoAutomatica}" disabled="true"/>
			</p:column>
			<p:column headerText="Parcelamento">
				<h:selectBooleanCheckbox value="#{m.podeGerarParcela}" disabled="true"/>
			</p:column>
			<p:column headerText="Ação">
				<p:commandButton value="Atualizar" action="#{formaPagamentoManager.prepareUpdate}" process="@this" update=":form">
					<f:setPropertyActionListener target="#{formaPagamentoManager.formaPagamento}" value="#{m}" />
				</p:commandButton>
			</p:column>
			
		</p:dataTable>
	
	</f:view>
</html>